Ext.onReady(function(){
	Ext.form.Field.prototype.msgTarget='side';
	Ext.util.CSS.swapStyleSheet('theme','ext/resources/css/xtheme-gray.css'); 
	Ext.QuickTips.init();  
	
	var boddate = new Ext.form.DateField({
		fieldLabel:'BirthDay',
		name:'bod',
		format:'Y-m-d'
	})
	
	var regForm = new Ext.form.FormPanel({
		width:400,
		height:200,
		renderTo:'regform',
		frame:true,
		items:
		[
			{xtype:'textfield',name:'username',fieldLabel:'User Name'},
			{xtype:'textfield',name:'password',fieldLabel:'Password'},
			{xtype:'textfield',vtype:'email',name:'email',fieldLabel:'email'},
			boddate
		],
		buttons:
				[
					{text:'register!',
					handler:function(){
								regForm.getForm().getEl().dom.action='register.action';
								regForm.getForm().getEl().dom.submit();
							}
					}
				]
	})
})